package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;

import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;

public class AnkhInvulnerability extends FlavourBuff {

	{
		type = Buff.buffType.POSITIVE;
	}

	public static final float DURATION	= 3f;

	@Override
	public void fx(boolean on) {
		if (on) target.sprite.aura( 0xFFFF00 );
		else target.sprite.clearAura();
	}

	@Override
	public int icon() {
		return BuffIndicator.ANKH;
	}

	@Override
	public float iconFadePercent() {
		return Math.max(0, (DURATION - visualcooldown()) / DURATION);
	}

	@Override
	public String toString() {
		return Messages.get(this, "name");
	}

	@Override
	public String desc() {
		return Messages.get(this, "desc", dispTurns());
	}

	{
		immunities.add(Paralysis.class);
		immunities.add(Frost.class);
	}

}
